<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={dede:global.cfg_soft_lang/}" />
<title>{dede:global.cfg_webname/}</title>

<meta name="description" content="{dede:global.cfg_description/}" />
<meta name="keywords" content="{dede:global.cfg_keywords/}" />
<link href="{dede:global.cfg_templets_skin/}/liqi/css/base.css" rel="stylesheet" media="screen" type="text/css" />
<link href="{dede:global.cfg_templets_skin/}/liqi/css/style.css" rel="stylesheet" media="screen" type="text/css" />
<script language="javascript" type="text/javascript" src="{dede:global.cfg_cmspath/}/images/js/j.js" ></script>
<script language="javascript" type="text/javascript" src="{dede:global.cfg_templets_skin/}/js/pic_scroll.js"></script>
<script language="javascript" type="text/javascript" src="{dede:global.cfg_templets_skin/}/liqi/js/liqi.js" ></script>
<script type="text/javascript">
<!--
function MM_showHideLayers() { //v9.0a
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

     // 根据价格快速查找
	function setJgHref(obj,value) {
		var srcArray = obj.href.split(value);
		var t_src = srcArray[1];
		//window.open('./plus/list.php?channelid=17&tid=12'+value+t_src);
		//obj.href = "javascript:void(0)";
		obj.href="./plus/list.php?channelid=17&tid=12'+value+t_src";
		return false;
	}
	
	// 根据地区快速查找
	function setAreaHref(obj,value) {
		var srcArray = obj.href.split(value);
		var t_src = srcArray[1];
		//window.open('./plus/list.php?channelid=17&tid=12'+value+t_src);
		//obj.href = "javascript:void(0)";
		obj.href="./plus/list.php?channelid=17&tid=12'+value+t_src";
		return false;
	}
	
	// 点击快速查找按钮
	function searchFast() {
		var name = document.getElementById("searchKey").value;
		window.open('./plus/list.php?channelid=17&tid=12&infotype=0&salesName='+name);
	}
	
	// id="searchKey" onclick="clearText()" 
	function clearText() {
	   document.getElementById("searchKey").value="";
	}
	
	// 表单校验 
	function checkValidate() {
	    var name = document.getElementById("nameId");
		if(null == name || null == name.value || "" == name.value.replace(/(^\s*)|(\s*$)/g,'')) {
		   alert('姓名不能为空！');
		   return false;
		}
		
		var mobile = document.getElementById("mobileId");
		if(null == mobile || null == mobile.value || "" == mobile.value || "" == mobile.value.replace(/(^\s*)|(\s*$)/g,'')) {
		  alert('联系电话不能为空！');		  
		  return false;
		}
		document.forms[0].submit();
	}
//-->
</script>
<script language="javascript">
    $(document).ready(function(){
        isLogin();
    });

</script>
<style type="text/css">
  form{
	 margin:0px;
	 display: inline
  }
</style>
</head>

<body>
	<!--top-->
	<div class="w1002 bc topbar">
		<!--topbar-->
    	<div class="pr12 clearfix">  
	        	<ul>
	            	<li class="fr">
	                <a href="{dede:global.cfg_cmsurl/}/plus/list.php?tid=25"><span>帮助中心</span></a>
	               </li>
	            	<li class="fr" id="denglu">
	                	<a  target="_blank" href="./member/login.php">登 录</a>
	                </li>
	            	<li class="fr" id="zhuce">
	                	<a  target="_blank" href="./member/index_do.php?fmdo=user&dopost=regnew">注 册</a>
	                </li>
	        	</ul>
				
				<li class="fr" id="tuichu" >
	                	
	           </li>
					
	        	<ul class="fr">
	            	<li>
	                	<marquee width="452" height="19">{dede:myad name='index_top_word'/}</marquee>
	                </li>
	        	</ul>
        </div>
    </div>
    <!--end of topbar-->
    
    <div class="w1002 bc">
    <!--hearder-->
    <div class=" hearder clearfix">
    	<div class="logo fl">
        	<h1>
            	<a href="#">{dede:myad name='items_logo'/}</a>
            </h1>
        </div>
        <div class="pic_ad1 fr">
        	<a>{dede:myad name='item_top_right'/}</a>
        </div>
    </div>
    </div>
    <!--end of hearder-->
    
    <!--nav 导航菜单q-->
    <div class="nav w1002 bc">
       <ul>
		     <li><a class="selected" href='{dede:global.cfg_cmsurl/}/'>首&nbsp;&nbsp;&nbsp;&nbsp;页</a></li>
		     {dede:channel type='top' row='10' currentstyle="
		     	<li class='selected'><a href='~typelink~' ~rel~>~typename~</a></li>
		     "}
		     <li><a href='[field:typeurl/]' [field:rel/]>[field:typename/]</a></li>
		     {/dede:channel}
	    </ul>
    </div>
    <!--end of nav-->
    
    <!--end of top-->
    
    <!--main-->
    <div class="w1002 bc main clearfix">
    	<!--右边-->
    	<div class="right fr">
        	<div class="xfbz mb8">{dede:myad name='index_xfzcn'/}</div>
            <div class="customers_services mb8">
                 <!--报名-->
            	  <p class="p8">提交报名后，我们会尽快与您联络</p>
                <div class="p4 t_cen" >
						<form name="form1" action="./plus/diy.php" enctype="multipart/form-data" method="post">
							<input type="hidden" name="action" value="post" />
							<input type="hidden" name="diyid" value="2" />
							<input type="hidden" name="do" value="2" />
							<label>姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：
								<input type="text" name='name' id='nameId' class="input" />
							</label>
						    <label>联系电话：
		                    <input type="text" name='mobile' id='mobileId' class="input" />
		                  </label>
							<input type="hidden" name="dede_fields" value="name,text;mobile,text;" />
							<input type="hidden" name="dede_fieldshash" value="5bc21b49723ae720a6cb5ba6a248dd04" />
							<input type="button" onclick="checkValidate();" name="submit1" class="button_1" value="快速报名" />
						</form>
			   </div>
                <ul class="clearfix">
                	<li class="fr"><a href="http://wpa.qq.com/msgrd?V=1&Uin=1346803414&Site=newsauto&Menu=yes" class="qq">qq</a></li>
                	<li class="fr"><a href="msnim:chat?contact=newsauto.com.cn@hotmail.com" class="msn mr5">msn</a></li>
                </ul>
            </div>
            <div class="huodong mb8"><!--活动-->
            	<p class="mb8 t_cen">{dede:myad name='index_mid_right'/}</p>
                <ul>
                	<li class="fr">{dede:myad name='index_mid_right2'/}</li>
                </ul>
            </div>
            <div class="pic_links mb8 clearfix"><!--图片链接-->
            	<ul>
                	<li class="mr3 mb3">{dede:myad name='index_gcxz'/}</li>
                	<li class="mb3">{dede:myad name='index_gclc'/}</li>
                	<li class="mr3 mb3">{dede:myad name='index_jgks'/}</li>
                	<li class="mb3">{dede:myad name='index_jtbz'/}</li>
                	<li class="mr3 mb3">{dede:myad name='index_gcmj'/}</li>
                	<li class="mb3">{dede:myad name='index_gcsp'/}</li>
                </ul>
            </div>
            <div class="sina mb8"><!--微博-->
            	<iframe width="100%" height="100%" class="share_self"  frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?width=0&height=550&fansRow=2&ptype=1&speed=0&skin=3&isTitle=1&noborder=1&isWeibo=1&isFans=1&uid=1794559157&verifier=35ab0dff"></iframe>
            </div>
            	 {dede:myad name='index_bottom_right'/}
        </div>
        <!--右边结束-->
        
        <!--左边开始-->
        <div class="fl mr12 pt9 w746">
        	<div class="filter mb8"><!--筛选-->
            	<div class="f_t">
                	<div class="f_b">
                    	<div class="search clearfix mb8"><!--search-->
                        	<ul class="mr5 fl">
                           	  <li>
                           	    <input id="searchKey" onclick="clearText()" name="input" type="text" class="input_2 fl" value="快速查找经销商" />
                       	        <input name="" onclick="searchFast()"  type="button" class="button_2 fr" /></li>
                            </ul>
                            <span class="fl"><a  href="./plus/list.php?tid=12">高级搜索</a></span>
                        </div>
                        <div><!--推荐-->
                        	<dl class="clearfix mb10">
                                <dt class="fl">推荐经销商</dt>
                            	<dd class="fr clearfix">
                                	<ul>
										   {dede:php}
										  
$mysql = "SELECT t1.id,t1.title,t2.area,t2.shopName,t2.address FROM dede_archives t1 LEFT JOIN dede_addon4sks t2 ON t1.id = t2.aid WHERE t2.typeid='12' AND t2.sftjjxs = '是' limit 0,10"; 
								              $con = mysql_connect($cfg_dbhost,$cfg_dbuser,$cfg_dbpwd);
												mysql_select_db($cfg_dbname, $con);
												mysql_query("SET NAMES ".$cfg_db_language); 
												$query = mysql_query($mysql); 
												$n=mysql_num_rows($query);
												while($row = mysql_fetch_array($query,MYSQL_ASSOC)) {
													  echo '<li><a target="_blank" href="./plus/view.php?aid='.$row["id"].'" >'.$row["shopName"].'</a></li>';
													  
												}
												//mysql_close($con);
										   {/dede:php}
                                    </ul>
                                </dd>
                            </dl>
							{dede:infolink}
                        	<dl class="clearfix mb10">
                             <dt class="fl">价格区间</dt>
                            	<dd class="fr clearfix">
                                	<ul>
                                    [field:s4jg/]&nbsp;
                                    </ul>
                                </dd>
                            </dl>
                        	<dl class="clearfix">
                                <dt class="fl">购车区域</dt>
                            	<dd class="fr clearfix">
                                 <ul>
                                    	[field:area/]&nbsp;
                                 </ul>
                                </dd>
                            </dl>
							{/dede:infolink}
                        </div>
                    </div>
                </div>
            </div>
            <div class="aera mb8 clearfix"  ><!--区域-->
            	<div class="a_l">
                	<div class="a_r">
                    	<h1 class="fl mr5">购车区域</h1>
							<ul>
							   	{dede:php}
								   $arear_arr = array();
								   $areaSql = "SELECT * FROM dede_sys_enum t WHERE t.egroup='area' ";
								   $areaQuery = mysql_query($areaSql);
								   while($row = mysql_fetch_array($areaQuery,MYSQL_ASSOC)) {
										  $arear_arr[$row["ename"]] = $row["ename"];
										  
									}
									$area_index = 0;
									foreach ($arear_arr as $value ) {
										$area_index ++;
										// 输出行政区划 
										echo '<li  id="area_li_'.$area_index.'" onmouseout="hiddenData(this)" onmouseover="showData(\''.$area_index.'\',this)" >
												<a href="#"  id="area_li_'.$area_index.'_href"><span >'.$value.'</span></a>
											  </li>';
									}	
									mysql_close($con);
								{/dede:php}
                        </ul>
                   </div>
                </div>
            </div>
            <div class="tips mb8"><!--秘笈-->
             	{dede:channelartlist typeid='15' row=20}
	            	<div class="clearfix">
	            		<h1 class="fl">{dede:field name='typename'/}</h1>
	                	<a  href="{dede:field name='typeurl'/}" class="more_1 fr">更多</a>
	                </div>
	                <div class="clearfix con_1">
	                	<ul>
		                	 	{dede:arclist  titlelen='28' row='20' }
		                	 	  [field:global name='autoindex' runphp='yes']
		                          	if(@me%2 == 0){
		                          	 	@me = '<li class="mr55">';
		                          	} else {
		                          		@me = '<li>';
		                          	}
		                          [/field:global]
		                	 		<a  target="_blank" title="[field:title /]" href="[field:arcurl /]">[field:flag  function="qin_isCommendArchives(@me)" /][field:title /]</a><span>[field:pubdate function=strftime("%Y-%m-%d",@me)/]</span></li>
		                        {/dede:arclist}
	                    </ul>
	                </div>
                {/dede:channelartlist} 
            </div>
            
            <div class="tips mb8"><!--视频-->
			   {dede:channelartlist typeid='16' row=1}
            	<div class="clearfix">
            		<h1 class="fl">购车视频</h1>
                	<a   href="./plus/list?tid=16" class="more_1 fr">更多</a>
                </div>
                <div class="clearfix con_2">
                	<ul>
                	     {dede:arclist  typeid="16" row=4 orderby=pubdate type='image.' imgwidth='143' imgheight='106'}
					        <li><a  target="_blank" href="[field:arcurl/]">[field:image/]<span class="title">[field:title/]</span></a></li>
					      {/dede:arclist}
                    </ul>
                </div>
			   {/dede:channelartlist} 
            </div>
            <!--连接 start -->
            <div class="links clearfix mb8">
            	<div class="clearfix">
            		<h1 class="fl">友情链接</h1>
                	<i class="fl">Links</i>
                </div>
                <div class="clearfix con">
                	<ul>
                	     {dede:arclist typeid="20" row=50 orderby=pubdate}
				         	<li><a  target="_blank" href="[field:arcurl/]">[field:title/]</a></li>
				         {/dede:arclist}
                    </ul>
                </div>
            </div>
            <!--连接 end -->
        </div>
    </div>
    <!--end of main-->
    <!--footer-->
    {dede:include file='./liqi/item_footer.htm' /}    	
    <!--end of footer-->
	
								{dede:php}
								   
								   $arear_arr = array();
								   $areaSql = "SELECT ename FROM dede_sys_enum t WHERE t.egroup='area'";
								   $areaQuery = mysql_query($areaSql);
								   while($row = mysql_fetch_array($areaQuery,MYSQL_ASSOC)) {
										  $arear_arr[$row["ename"]] = $row["ename"];
										  
									}
									$mysql = "SELECT t1.id,t1.title,t3.evalue,t3.ename as area,t2.shopName,t2.address,t2.salesHotline,t2.mouthword  FROM dede_archives t1 LEFT JOIN dede_addon4sks t2 ON t1.id = t2.aid left join dede_sys_enum t3 on t2.area = t3.disorder  WHERE t3.egroup='area' and t2.typeid='12'"; 
									$query = mysql_query($mysql); 
									
									$areaEvalue = "";
									$area_index = 0;
									foreach ($arear_arr as $value ) {
										$area_index ++;
									    $divStr = "";
										$totalCount = 0;
										mysql_data_seek($query,0); // 移动指针到数组的开始

										while(($row = mysql_fetch_array($query,MYSQL_ASSOC))&& $totalCount < 10 ) {
											  if($row["area"] == $value  ) {
											       $areaEvalue = $row["evalue"];
												   $totalCount ++;
												   if($totalCount%2==0) {
												     $divStr .= '<tr style="background-color:#c0c0c0">';
												   } else {
												     $divStr .= '<tr >';
												   }
												   
												   $sName = $row["shopName"];
												   if(strlen($sName) > 24) {
													  $sName =  mb_substr($row["shopName"],0,8,'UTF-8')."...";
										          }
												  
												   $sAddress = $row["address"];
												   if(strlen($sAddress) > 24) {
													  $sAddress =  mb_substr($row["address"],0,8,'UTF-8')."...";
										          }
												   $sSalesHotline = $row["salesHotline"];
												   if(strlen($sSalesHotline) > 13) {
													  $sSalesHotline =  mb_substr($row["salesHotline"],0,13,'UTF-8')."...";
										          }
												   $divStr .='	<td > <a title="'.$row["shopName"].'" target="_blank" href="./plus/view.php?aid='.$row["id"].'">'.$sName.'</a></td>
																	<td title="'.$row["address"].'">'.$sAddress.'</td>
																	<td title="'.$row["salesHotline"].'">'.$sSalesHotline.'</td>
																	<td>'.$row["mouthword"].'</td>
																	<td></td>
																</tr> ';
											  }
											  
										}

									    // 输出subDiv
									   echo '<div class="h_layer clearfix" id="h_layer_'.$area_index.'" >
												<div class="h_layer_2">
													<div class="h_layer_3">
														<div class="h_layer_4">
															<div class="h_layer_5">
																<div class="h_layer_6">
																	<div class="h_layer_7">
																		<div class="h_layer_8 clearfix" id="h2_layer_'.$area_index.'">
																			<table   width="100%" border="0" cellspacing="0" cellpadding="0" class="table" id="tableId_'.$area_index.'" >
																			  <tr>
																				<th>店名</th>
																				<th>销售地址</th>
																				<th>销售热线</th>
																				<th>口碑</th>
																				<th>&nbsp;&nbsp;<a href="javascript:void(0)" onclick="hiddenData(\''.$area_index.'\')" ><img src="./images/gb_zqx.gif"/></a></th>
																			  </tr>
																			  '.$divStr.'
																			</table>
																			<a target="_blank" href="./plus/list.php?channelid=17&tid=12&area='.$areaEvalue.'&s4jg=0&level=0&s4pp=0" class="more_1 fr">更多</a>
																		</div>
																	</div>
																</div>
															</div>
														</div>
													</div>
												</div>
											</div> ';
									}	
									mysql_close($con);
								 {/dede:php}								
</body>
</html>
<script>
	var datadiv=null;
	var hrefDiv=null;
	var seleted=null;
	function getPos(el) {
		var r = { left: el.offsetLeft, top: el.offsetTop };
		if (el.offsetParent) {
		    r.left=el.offsetParent.offsetLeft+el.offsetLeft;
		      r.top=el.offsetParent.offsetTop+el.offsetTop;
		      
		}
		return r;
	}
	
	// 显示下拉列表
	function showData(showid,obj){
	    
	    if(datadiv!=null)
		{
			datadiv.style.display="none";
		}
		 if(hrefDiv!=null)
		{
		    //alert(spanDiv.style.className);
			hrefDiv.className="";
		}if(seleted!=null)
		{
			seleted.style.zIndex=40;
		}
			datadiv=document.getElementById('h_layer_'+showid);		  
			hrefDiv=document.getElementById(obj.id+"_href")
		hrefDiv.className="selected";
		seleted=obj;
		obj.style.zIndex=100;
		var r=getPos(obj);		
		//alert(r.top+","+r.left)
		datadiv.style.top=r.top+24; 
		datadiv.style.left=r.left-5;
		datadiv.style.display="block";
		setDivHeight(showid);
	} 
	
	// 设置div的高度，根据列表的行数自动变大或者变小 
	function setDivHeight(id) {
	    // 得到table的对象 
	    var t_table = document.getElementById('tableId_'+id);
		if(null != t_table) {
		   // 得到table的行数
		   var t_rows = t_table.rows.length;
		   var h_div1 = document.getElementById('h_layer_'+id);
		   var h_div2 = document.getElementById('h2_layer_'+id);
		   if(t_rows < 2 ) {
		      // alert(t_rows);
		      h_div1.style.height = "70px";
			  h_div2.style.height = "50px";
		   } else {
		      h_div1.style.height = 32+t_rows*23+"px";
			  h_div2.style.height = 20+t_rows*23+"px";
		   }
		}
	}
	
	
	
	// 隐藏div
	function hiddenData(divId) {
		var obj = document.getElementById('h_layer_'+divId);
		if(null != obj) {
			obj.style.display="none";
			hrefDiv.className="";
		}
	   // obj.style.display="none";
	}

</script>